<h2>Lista terminów:</h2>
<table>
<tr>
	<th>Przedmiot</th>
	<th>Dzień</th>
	<th>Tydzień</th>
	<th title="Początek">Pocz.</th>
	<th title="Koniec">Kon.</th>
	<th title="Pojemność">Poj.</th>
	<th title="Sala">Sala</th>
	<th>Prowadzący</th>
</tr>
<form action="" method="post">
<input type="hidden" name="editData" value="1" />
{foreach from=$terms item=std}
<tr>

<td><input type="hidden" name="type[]" value="edit" />
<input type="hidden" name="termID[]" value="{$std.termID}"/>
{html_options name="subjectID[]" options=$subjects selected=$std.subjectID}</td>
<td>{html_options name="day[]" options=$days selected=$std.day}</td>
<td>{html_options name="week[]" options=$week selected=$std.week}</td>
<td>
    {html_options name="timeStart[]" options=$hours class="timeStart" selected=$std.timeStart}
</td>
<td>
    {html_options name="timeEnd[]" options=$hours selected=$std.timeEnd}
</td>
<td><input type="text" name="capacity[]" value="{$std.capacity}" class="cap" /></td>
<td><input type="text" name="room[]" value="{$std.room}" class="room" /></td>
<td><input type="text" name="teacher[]" value="{$std.teacher}" /></td>
<td><a href="?admin,terms,del,{$std.termID}"><img src="_gfx/admin_drop.png" alt="usuń" title="usuń"/></a></td>
<td>{$std.subjectID},{$std.genID}</td>
</tr>
{/foreach}
<tr><td><input type="submit" value="aktualizuj" /></td></tr>
</form>
<tr><td colspan="6">Dodaj:</td></tr>
<tr>
<form action="" method="post">
<td><input type="hidden" name="type" value="add" />
<input type="hidden" name="termID" value="0"/>
{html_options name="subjectID" options=$subjects}</td>
<td>{html_options name="day" options=$days}</td>
<td>{html_options name="week" options=$week}</td>
<td>{html_options name="timeStart" options=$hours class="timeStart"}</td>
<td>{html_options name="timeEnd" options=$hours}</td>
<td><input type="text" name="capacity" class="cap"/></td>
<td><input type="text" name="room" class="room" /></td>
<td><input type="text" name="teacher" /></td>

<td><input type="submit" value="Dodaj" /></td>
</form>
</tr>
</table>
